while getopts ":p:-:" opt; do
	case "$opt" in
		-)
			case "$OPTARG" in
				pouet)
					echo "long ${!OPTIND}" >&2
					pouet=${!OPTIND}
					OPTIND=$(($OPTIND+1))
					;;
				*)
					echo "wtf $OPTARG" >&2
					exit 1
					;;
			esac
			;;
		p)
			echo "short $OPTARG!" >&2
			pouet=$OPTARG
			;;
		\?)
			echo "wtf $OPTARG" >&2
			exit 1
			;;
	esac
done
shift $(($OPTIND-1))
echo "pouet is $pouet"
echo "rest $@"
